﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Customer.aspx.cs" Inherits="admin_Customer" StylesheetTheme="admin" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div align="center">
        会员管理<br />
        <hr />
    
    </div>
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
            BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px"
            CellPadding="3" DataKeyNames="id" DataSourceID="SqlDataSource1" Height="51px"
            OnRowDataBound="GridView1_RowDataBound" Width="734px">
            <FooterStyle BackColor="White" ForeColor="#000066" />
            <Columns>
                <asp:BoundField DataField="id" HeaderText="序号" InsertVisible="False" ReadOnly="True"
                    SortExpression="id" />
                <asp:BoundField DataField="uid" HeaderText="用户编号" SortExpression="uid" />
                <asp:BoundField DataField="email" HeaderText="电子邮件" SortExpression="email" />
                <asp:BoundField DataField="uname" HeaderText="用户姓名" SortExpression="uname" />
                <asp:BoundField DataField="uaddress" HeaderText="地址" SortExpression="uaddress" />
                <asp:BoundField DataField="uphone" HeaderText="联系电话" SortExpression="uphone" />
                <asp:BoundField DataField="uregtime" HeaderText="注册时间" SortExpression="uregtime" />
                <asp:BoundField DataField="account" HeaderText="帐户余额" SortExpression="account" />
                <asp:CommandField CausesValidation="False" HeaderText="删除" ShowDeleteButton="True" />
            </Columns>
            <RowStyle ForeColor="#000066" />
            <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
            <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConflictDetection="CompareAllValues"
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" DeleteCommand="DELETE FROM [UserInfo] WHERE [id] = @original_id "
            InsertCommand="INSERT INTO [UserInfo] ([uid], [email], [uname], [uaddress], [uphone], [uregtime], [account]) VALUES (@uid, @email, @uname, @uaddress, @uphone, @uregtime, @account)"
            OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT [id], [uid], [email], [uname], [uaddress], [uphone], [uregtime], [account] FROM [UserInfo]"
            UpdateCommand="UPDATE [UserInfo] SET [uid] = @uid, [email] = @email, [uname] = @uname, [uaddress] = @uaddress, [uphone] = @uphone, [uregtime] = @uregtime, [account] = @account WHERE [id] = @original_id AND [uid] = @original_uid AND [email] = @original_email AND [uname] = @original_uname AND [uaddress] = @original_uaddress AND [uphone] = @original_uphone AND [uregtime] = @original_uregtime AND [account] = @original_account">
            <DeleteParameters>
                <asp:Parameter Name="original_id" Type="Int32" />
              
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="uid" Type="String" />
                <asp:Parameter Name="email" Type="String" />
                <asp:Parameter Name="uname" Type="String" />
                <asp:Parameter Name="uaddress" Type="String" />
                <asp:Parameter Name="uphone" Type="String" />
                <asp:Parameter Name="uregtime" Type="DateTime" />
                <asp:Parameter Name="account" Type="Decimal" />
                <asp:Parameter Name="original_id" Type="Int32" />
                <asp:Parameter Name="original_uid" Type="String" />
                <asp:Parameter Name="original_email" Type="String" />
                <asp:Parameter Name="original_uname" Type="String" />
                <asp:Parameter Name="original_uaddress" Type="String" />
                <asp:Parameter Name="original_uphone" Type="String" />
                <asp:Parameter Name="original_uregtime" Type="DateTime" />
                <asp:Parameter Name="original_account" Type="Decimal" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="uid" Type="String" />
                <asp:Parameter Name="email" Type="String" />
                <asp:Parameter Name="uname" Type="String" />
                <asp:Parameter Name="uaddress" Type="String" />
                <asp:Parameter Name="uphone" Type="String" />
                <asp:Parameter Name="uregtime" Type="DateTime" />
                <asp:Parameter Name="account" Type="Decimal" />
            </InsertParameters>
        </asp:SqlDataSource>
    </form>
</body>
</html>
